package com.ymttest.common.enums;

import com.ymt.core.tool.Logger;

public enum MessageToolEnum {
	Sms(1), ImMessageCenter(2);

	private int intValue;
	private static java.util.HashMap<Integer, MessageToolEnum> mappings;

	private synchronized static java.util.HashMap<Integer, MessageToolEnum> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, MessageToolEnum>();
		}
		return mappings;
	}

	private MessageToolEnum(int value) {
		intValue = value;
		MessageToolEnum.getMappings().put(value, this);
	}

	public int getValue() {
		return intValue;
	}

	public static MessageToolEnum forValue(int value) {
		return getMappings().get(value);
	}

	public static void main(String[] args) {

		Logger.debug(MessageToolEnum.forValue(1));

	}
}
